package com.zfei.gfb.request;
import com.zfei.gfb.util.ObjUtil;
import com.zfei.gfb.bean.Status;
import com.zfei.gfb.bean.StatusException;


/**
 * @author fgh
 */
public class GfbVillagerRequest  {

// id
private Integer id;
// gfb_admin主键
private Integer userId;
// 姓名
private String name;
// 手机号
private String phone;
// 身份证号
private String idCard;
// 现居地址
private String address;
// 村名
private String villagerName;
// 镇名
private String townName;
// 扩展
private String ext;
// createTime
private Long createTime;
// 中文时间
private String cntime;
// updateTime
private Long updateTime;

public void setId(Integer value) {
        this.id = value;
        }

public Integer getId() {
        return this.id;
        }

public void setUserId(Integer value) {
        this.userId = value;
        }

public Integer getUserId() {
        return this.userId;
        }

public void setName(String value) {
        this.name = value;
        }

public String getName() {
        return this.name;
        }

public void setPhone(String value) {
        this.phone = value;
        }

public String getPhone() {
        return this.phone;
        }

public void setIdCard(String value) {
        this.idCard = value;
        }

public String getIdCard() {
        return this.idCard;
        }

public void setAddress(String value) {
        this.address = value;
        }

public String getAddress() {
        return this.address;
        }

public void setVillagerName(String value) {
        this.villagerName = value;
        }

public String getVillagerName() {
        return this.villagerName;
        }

public void setTownName(String value) {
        this.townName = value;
        }

public String getTownName() {
        return this.townName;
        }

public void setExt(String value) {
        this.ext = value;
        }

public String getExt() {
        return this.ext;
        }

public void setCreateTime(Long value) {
        this.createTime = value;
        }

public Long getCreateTime() {
        return this.createTime;
        }

public void setCntime(String value) {
        this.cntime = value;
        }

public String getCntime() {
        return this.cntime;
        }

public void setUpdateTime(Long value) {
        this.updateTime = value;
        }

public Long getUpdateTime() {
        return this.updateTime;
        }


        public void checkInsertNull() {
                if (ObjUtil.anyNull(name)) {
                        throw new StatusException(Status.INVALID_ARGUMENT);
                }

        }

        public void checkUpdateNull() {
                checkInsertNull();
                if (id == null) {
                        throw new StatusException(Status.INVALID_ARGUMENT);
                }
        }
        }

